package com.codebattery.client;

import com.codebattery.domain.model.MemberOrderInfo;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.data.domain.Page;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(name = "order-service")
public interface OrderFeignClient {

    @GetMapping("/order/get-member-orders")
    Page<MemberOrderInfo> getMemberOrders(@RequestParam("memberId") String memberId);

    @GetMapping("/order/get-all-orders")
    List<MemberOrderInfo> getAllOrders();

}